﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace University.Workshop.DataAccess
{
    public class DBHelper
    {

        const string conecctionString = "Data Source=.\\SQLEXPRESS; Initial Catalog=DataBaseHotel; Integrated Security=True";



        public static DataTable CargarClientes()
        {
            SqlConnection conexion = new SqlConnection(conecctionString);
            conexion.Open();
            string sentencia = "SELECT FullName, ClientId, Telephone, Email, OrganizatioN, Country FROM [Client]";
            SqlCommand comando = new SqlCommand(sentencia, conexion);
            SqlDataReader reader;
            reader = comando.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(reader);
            conexion.Close();
            return dt;
        }


        public static DataTable ClientesActuales()
        {
            SqlConnection conexion = new SqlConnection(conecctionString);
            conexion.Open();
            string sentencia = "SELECT FullName, ClientId, Telephone, Email, OrganizatioN, Country FROM [Client]";
            SqlCommand comando = new SqlCommand(sentencia, conexion);
            SqlDataReader reader;
            reader = comando.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(reader);
            conexion.Close();
            return dt;
        }

        /*
        internal static System.Data.DataTable ClientesActuales()
        {
            throw new NotImplementedException();
        }

        internal static System.Data.DataTable ClientesProductoscomprados()
        {
            throw new NotImplementedException();
        }

        internal static System.Data.DataTable ClientesProductoscompradosConFecha(string f1, string f2)
        {
            throw new NotImplementedException();
        }

        internal static System.Data.DataTable ClientesCantidadMonetarias()
        {
            throw new NotImplementedException();
        }*/
    }
}
